package com.onlineMIS.ORM.DAO.chainS.sales;

import org.springframework.beans.BeanUtils;

import com.onlineMIS.ORM.entity.chainS.sales.ChainStoreSalesOrder;
import com.onlineMIS.common.Common_util;

public class ChainStoreSalesOrderVO {
	private int id;
	private String chainName;
	private String orderDate;
	private String orderCreateDate;
	private String statusS;
	private int status;
	private String isVip;
	private String chainSalerName;
	private int totalQuantity;
	private double netAmount;
	private double discount;
	private int totalQuantityR;
	private double netAmountR;
	private int totalQuantityF;
	private String memo;	
	private String details;
	private int isHide;
	
	

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getChainName() {
		return chainName;
	}

	public void setChainName(String chainName) {
		this.chainName = chainName;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public String getOrderCreateDate() {
		return orderCreateDate;
	}

	public void setOrderCreateDate(String orderCreateDate) {
		this.orderCreateDate = orderCreateDate;
	}

	public String getStatusS() {
		return statusS;
	}

	public void setStatusS(String statusS) {
		this.statusS = statusS;
	}

	public String getIsVip() {
		return isVip;
	}

	public void setIsVip(String isVip) {
		this.isVip = isVip;
	}

	public String getChainSalerName() {
		return chainSalerName;
	}

	public void setChainSalerName(String chainSalerName) {
		this.chainSalerName = chainSalerName;
	}

	public int getTotalQuantity() {
		return totalQuantity;
	}

	public void setTotalQuantity(int totalQuantity) {
		this.totalQuantity = totalQuantity;
	}

	public double getNetAmount() {
		return netAmount;
	}

	public void setNetAmount(int netAmount) {
		this.netAmount = netAmount;
	}

	public double getDiscount() {
		return discount;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	public int getTotalQuantityR() {
		return totalQuantityR;
	}

	public void setTotalQuantityR(int totalQuantityR) {
		this.totalQuantityR = totalQuantityR;
	}

	public double getNetAmountR() {
		return netAmountR;
	}

	public void setNetAmountR(int netAmountR) {
		this.netAmountR = netAmountR;
	}

	public int getTotalQuantityF() {
		return totalQuantityF;
	}

	public void setTotalQuantityF(int totalQuantityF) {
		this.totalQuantityF = totalQuantityF;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public int getIsHide() {
		return isHide;
	}

	public void setIsHide(int isHide) {
		this.isHide = isHide;
	}
	
	

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public void setNetAmount(double netAmount) {
		this.netAmount = netAmount;
	}

	public void setNetAmountR(double netAmountR) {
		this.netAmountR = netAmountR;
	}

	public ChainStoreSalesOrderVO() {
		// TODO Auto-generated constructor stub
	}
	
	public ChainStoreSalesOrderVO(ChainStoreSalesOrder order) {
		this.id = order.getId();
		this.chainName = order.getChainStore().getChain_name();
		this.orderDate = Common_util.dateFormat.format(order.getOrderDate());
		this.orderCreateDate = Common_util.dateFormat_f.format(order.getOrderCreateDate());
		this.statusS = order.getStatusS();
		if (order.getVipCard() != null) {
			this.isVip = order.getVipCard().getVipCardNo();
		}		
		this.chainSalerName = order.getSaler().getName();
		this.totalQuantity = order.getTotalQuantity();
		this.totalQuantityF = order.getTotalQuantityF();
		this.totalQuantityR = order.getTotalQuantityR();
		this.netAmount = order.getNetAmount();
		this.discount = (order.getTotalAmount() - order.getNetAmount());
		this.netAmountR = order.getNetAmountR();
		this.memo = order.getMemo();
		this.details = null;
		this.status = order.getStatus();
	}

}
